﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WebAppDemo
{
    public partial class SetCookie : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnSetCookie_Click(object sender, EventArgs e)
        {
            var htcookie=new HttpCookie("MingCookie","用一域名共享Cookie");
            htcookie.Expires.AddMinutes(4);
        }

        protected void btnSetSession_Click(object sender, EventArgs e)
        {
            Session["SetSession"] = "chenxm";
        }
    }
}